class LeaveDetailModel {
  int? errcode;
  String? errmsg;
  Data? data;
  String? message;

  LeaveDetailModel({this.errcode, this.errmsg, this.data, this.message});

  LeaveDetailModel.fromJson(Map<String, dynamic> json) {
    errcode = json['errcode'];
    errmsg = json['errmsg'];
    data = json['data'] != null ? new Data.fromJson(json['data']) : null;
    message = json['message'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['errcode'] = this.errcode;
    data['errmsg'] = this.errmsg;
    if (this.data != null) {
      data['data'] = this.data!.toJson();
    }
    data['message'] = this.message;
    return data;
  }
}

class Data {
  int? id;
  String? name;
  String? userName;
  String? typeName;
  String? dateStart;
  String? dateEnd;
  String? duration;
  String? state;
  bool? isFocus;
  int? holidayStatusId;
  String? requestUnit;
  String? requestDateFromPeriod;
  String? hourFrom;
  String? hourTo;
  String? requestDateFrom;
  String? requestDateTo;

  Data(
      {this.id,
        this.name,
        this.userName,
        this.typeName,
        this.dateStart,
        this.dateEnd,
        this.duration,
        this.state,
        this.isFocus,
        this.holidayStatusId,
        this.requestUnit,
        this.requestDateFromPeriod,
        this.hourFrom,
        this.hourTo,
        this.requestDateFrom,
        this.requestDateTo});

  Data.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    name = json['name'];
    userName = json['user_name'];
    typeName = json['type_name'];
    dateStart = json['date_start'];
    dateEnd = json['date_end'];
    duration = json['duration'];
    state = json['state'];
    isFocus = json['is_focus'];
    holidayStatusId = json['holiday_status_id'];
    requestUnit = json['request_unit'];
    requestDateFromPeriod = json['request_date_from_period'];
    hourFrom = json['hour_from'];
    hourTo = json['hour_to'];
    requestDateFrom = json['request_date_from'];
    requestDateTo = json['request_date_to'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['name'] = this.name;
    data['user_name'] = this.userName;
    data['type_name'] = this.typeName;
    data['date_start'] = this.dateStart;
    data['date_end'] = this.dateEnd;
    data['duration'] = this.duration;
    data['state'] = this.state;
    data['is_focus'] = this.isFocus;
    data['holiday_status_id'] = this.holidayStatusId;
    data['request_unit'] = this.requestUnit;
    data['request_date_from_period'] = this.requestDateFromPeriod;
    data['hour_from'] = this.hourFrom;
    data['hour_to'] = this.hourTo;
    data['request_date_from'] = this.requestDateFrom;
    data['request_date_to'] = this.requestDateTo;
    return data;
  }
}
